package com.lantosec.hmrp.modules.morality.vo;

import java.math.BigDecimal;
import java.util.List;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.lantosec.hmrp.modules.morality.entity.MoralityNoteSelf;
import com.lantosec.hmrp.core.mvc.BaseVO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * <p>
 * 考评记录自评明细 VO对象
 * </p>
 *
 * @author AutoCode
 * @since 2020-04-20
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value="MoralityNoteSelf对象", description="考评记录自评明细")
public class MoralityNoteSelfVO extends BaseVO<MoralityNoteSelf> {
    private static final long serialVersionUID = 1L;


    public MoralityNoteSelfVO(MoralityNoteSelf entity){
        this.noteSelfId = entity.getNoteSelfId();
        this.moralityPlanId = entity.getMoralityPlanId();
        this.moralityNoteId = entity.getMoralityNoteId();
        this.moralityTargetId = entity.getMoralityTargetId();
        this.moralityItemId = entity.getMoralityItemId();
        this.itemSelfScore = entity.getItemSelfScore();
    }

    @Override
    public MoralityNoteSelf convertToEntity(){
        return new MoralityNoteSelf(this);
    }


    @ApiModelProperty(value = "自评明细ID")
    @TableId(value = "note_self_id", type = IdType.AUTO)
    private Integer noteSelfId;

    @ApiModelProperty(value = "考评方案ID")
    private Integer moralityPlanId;

    @ApiModelProperty(value = "考评记录ID")
    private Integer moralityNoteId;

    @ApiModelProperty(value = "被考评人ID")
    private String moralityTargetId;

    @ApiModelProperty(value = "考评项目ID")
    private String moralityItemId;

    @ApiModelProperty(value = "项目自评分")
    private BigDecimal itemSelfScore;

    @ApiModelProperty(value = "项目名称")
    private String moralityItemName;
    @ApiModelProperty(value = "子类项目列表")
    private List<MoralityNoteSelfVO> moralityNoteSelfVOList;
    @ApiModelProperty(value = "项目得分")
    private BigDecimal standard;
    @ApiModelProperty(value = "项目名称")
    private String name;
    private Integer moralityItemType;
    private String parentItemId;
}
